-- CALC_FOX_TAIL_DESC

-- 计算狐尾的属性描述
return function(desc, props, classId, isEquiped)
    -- 经验值
    local expField = EquipM.querySpecial(classId, "exp_field");
    local exp = DungeonServiceM.queryDungeonAttrib(expField);
    local needExp = EquipM.calcUpgradeEquipExpNeed(classId);

    local curLevel = EquipM.getSpecialEquipLevel(classId);
    local maxLevel = EquipM.querySpecial(classId, "max_level");
    local desc = getLocStr("fox_tail_desc_1");

    if curLevel < maxLevel then
        desc = string.gsub(desc, "{exp}", tonumber(exp));
        desc = string.gsub(desc, "{need_exp}", tonumber(needExp));
    else
        desc = getLocStr("fox_tail_desc_2");
    end

    -- 1~9尾的属性描述
    local tailProps = {
        { 200, "magic", 5, -1, },
        { 14, 1, 50, -1, },
        { 405, "burn", 1, -1, },
        { 200, "magic", 10, -1, },
        { 14, 1, 100, -1, },
        { 204, 24, 1, -1, },
        { 200, "magic", 20, -1, },
        { 14, 1, 200, -1, },
        { 204, 24, 2, -1, },
    };

    for index, prop in ipairs(tailProps) do
        local propDesc = extractString(PropM.getPropDesc(prop));
        propDesc = string.gsub(getLocStr("fox_tail_desc_3"), "{num}", index) .. propDesc;

        if index > curLevel then
            desc = desc .. "\n[gray]" .. propDesc .. "[-]";
        else
            desc = desc .. "\n" .. propDesc;
        end
    end

    return "[blue]" .. desc .. "[-]";
end